<!-- 个人中心 -->
<template>
    <el-card>
        <template #header>
            <div class="card-header">普通读者用户中心</div>
        </template>
        <div class="card-content">
            <el-row>
                <el-col :span="12">
                    <el-card>
                        <template #header>个人信息</template>
                        <div>
                            <p>姓名：[读者姓名]</p>
                            <p>读者编号：[读者编号]</p>
                            <p>注册日期：[注册日期]</p>
                        </div>
                    </el-card>
                </el-col>
                <el-col :span="12">
                    <el-card>
                        <template #header>借阅信息</template>
                        <div>
                            <p>已借阅图书数量：[已借阅数量]</p>
                            <p>可借阅图书数量：[可借阅数量]</p>
                            <p>逾期未还图书数量：[逾期数量]</p>
                        </div>
                    </el-card>
                </el-col>
            </el-row>
            <el-row style="margin-top: 20px;">
                <el-col :span="24">
                    <el-card>
                        <template #header>借阅记录</template>
                        <el-table :data="borrowRecords" stripe>
                            <el-table-column prop="bookName" label="图书名称"></el-table-column>
                            <el-table-column prop="borrowDate" label="借阅日期"></el-table-column>
                            <el-table-column prop="returnDate" label="应还日期"></el-table-column>
                            <el-table-column prop="actualReturnDate" label="实际归还日期"></el-table-column>
                        </el-table>
                    </el-card>
                </el-col>
            </el-row>
        </div>
    </el-card>
</template>
<script setup>
import { ref } from 'vue';

const borrowRecords = ref([
    {
        bookName: '《算法导论》',
        borrowDate: '2025-03-01',
        returnDate: '2025-03-15',
        actualReturnDate: '2025-03-12'
    },
    {
        bookName: '《百年孤独》',
        borrowDate: '2025-03-05',
        returnDate: '2025-03-19',
        actualReturnDate: ''
    }
]);
</script>

<style scoped>
.card-header {
    font-size: 18px;
    font-weight: bold;
}

.card-content {
    padding: 20px;
}
</style>
